package com.atguigu.mybatis021.service;

import com.atguigu.mybatis021.mapper.EmpMapper;
import com.atguigu.mybatis021.pojo.Employee;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmpServiceImpl  implements EmpService {

    @Autowired
    private EmpMapper empMapper;

    @Override
    public Employee getEmpId(Integer id) {
        return empMapper.getEmpId(id);
    }

    @Override
    public void addEmp(Employee employee) {
        empMapper.addEmp(employee);
    }

    @Override
    public void updateEmpId(Employee employee) {
        empMapper.updateEmpId(employee);
    }

    @Override
    public void deleteEmpId(Integer id) {
        empMapper.deleteEmpId(id);
    }

    @Override
    public List<Employee> getEmps() {
        return empMapper.getEmps();
    }


}
